#pragma once

#include "Graphics/graphics.h"

struct VertexBuffer
{
	//-----------------------------------------------------------------------------
	//  Name : ~VertexBuffer ()
	/// <summary>
	/// 
	/// 
	/// 
	/// </summary>
	//-----------------------------------------------------------------------------
	~VertexBuffer();

	//-----------------------------------------------------------------------------
	//  Name : dispose ()
	/// <summary>
	/// 
	/// 
	/// 
	/// </summary>
	//-----------------------------------------------------------------------------
	void dispose();

	//-----------------------------------------------------------------------------
	//  Name : isValid ()
	/// <summary>
	/// 
	/// 
	/// 
	/// </summary>
	//-----------------------------------------------------------------------------
	bool isValid() const;

	//-----------------------------------------------------------------------------
	//  Name : populate ()
	/// <summary>
	/// 
	/// 
	/// 
	/// </summary>
	//-----------------------------------------------------------------------------
	void populate(const gfx::Memory* _mem
		, const gfx::VertexDecl& _decl
		, std::uint16_t _flags = BGFX_BUFFER_NONE);

	/// Internal handle
	gfx::VertexBufferHandle handle = { gfx::invalidHandle };
};